#ifndef SHIP_H
#define SHIP_H
#include "projectile.h"
#include "global.h"


class projectile;

class ship{
    private:
        int size;
        int health;
        int lives;
        int distance;
        float speed, width;
        float theta;
        int proj_count[3];
        int bomb_count[3];
        int def_count[3];
        int cur_proj;
        int cur_bomb;
        int cur_def;
        int max_weapon; //defines how many projectiles you can have onscreen at a time
        int energy;

    public:
        ship();
        ~ship(){};
        int nx, ny, lx, ly, rx, ry;
        int get_nx() {return this->nx;}
        int get_ny() {return this->ny;}
        int get_lx() {return this->lx;}
        int get_ly() {return this->ly;}
        int get_rx() {return this->rx;}
        int get_ry() {return this->ry;}
        int get_health() { return this->health; }
        float get_theta() {return this->theta;}
        int get_distance() {return this->distance;}
        int get_cur_proj() {return this->cur_proj;}
        int get_cur_bomb() {return this->cur_bomb;}
        int get_cur_def() {return this->cur_def;}
        int get_max_weapon() {return this->max_weapon;}
        int get_proj_count(int c){ return this->proj_count[c]; }
        int get_bomb_count(int c){ return this->bomb_count[c]; }
        int get_def_count(int c){ return this->def_count[c]; }
        int get_lives() { return lives; }
        int get_size() { return size; }
        int get_energy() {return energy; }
        void draw(BITMAP*);
        void move();
        void shoot(BITMAP*, ship*, projectile*, projectile* spread[], projectile* laser);
        int set_cur_weapon();
        void set_max_weapon(int a) {this->max_weapon = a;}
        void set_proj_count(int p, int c) {this->proj_count[p] = this->proj_count[p] + c; }
        void set_bomb_count(int b, int c) {this->bomb_count[b] = c; }
        void set_def_count(int d, int c) {this->def_count[d] = c; }
        void set_cur_proj(int p) {this->cur_proj = p; }
        void set_cur_bomb(int b) {this->cur_bomb = b; }
        void set_cur_def(int d) {this->cur_def = d; }
        void set_health(int h) { health = h; }
        void set_lives(int l) { lives = l; }
        void set_energy(int e) { energy = e; }
        void display_energy(BITMAP*);
        void refresh();
};
#endif
